package com.woniuxy.caradmin.mapper;


import com.woniuxy.caradmin.entity.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface UserMapper  {
    //查询所有角色
    public List<User> selectAllUser();
    //查询通过电话密码查询
    public User selectPhoAndPsw(@Param("telephone") String telephone,@Param("password") String password);
    //修改软删把avaible改为0
    public Integer delectUser(@Param("id") Integer id);
    //用户增加(用户注册)
    public Integer insertUser(User user);
    //用户修改
    public Integer updateUser(User user);
    //模糊查询根据电话和名字搜索
    public List<User> selectPhoAndName(User user);

    Integer empLevel(Integer uid);

    User selectOneUser(Integer uid1);
    //删除user_role表的信息
    public Integer deleteRoleByUid(@Param("uid") Integer uid);
    //增加user_role信息
    public Integer insertUserRole(@Param("rid") Integer rid,@Param("uid") Integer uid);
    //通过id查询用户
    public User selectUserByid(@Param("id") Integer id);
}
